package cnblog;

import java.io.*;
import java.net.*;
import java.util.*;
public class Client {
	public static void main(String[] args)
	   {//201521123025
	      try
	      {
	         Socket s = new Socket("127.0.0.1", 8189);
	         try
	         {
	            InputStream inStream = s.getInputStream();
	            Scanner in = new Scanner(inStream);

	            while (in.hasNextLine())
	            {
	               String line = in.nextLine();
	               System.out.println(line);
	            }
	         }
	         finally
	         {
	            s.close();
	         }
	      }
	      catch (IOException e)
	      {
	         e.printStackTrace();
	      }
	   }
}
